package org.zavgame.ejb;

import javax.annotation.PostConstruct;
import javax.ejb.Singleton;
import javax.ejb.Startup;

/**
 * This is a utility to initialize StatisticRegistry instance and start statistic thread.
 * 
 * @author alexey
 *
 */
@Startup
@Singleton
public class BoostrapUtility
{

   /**
    * Initialize StatisticRegistry on startup.
    */
   @PostConstruct
   public void initStat()
   {
      if (System.getProperty("zavgame.stat.enabled") != null)
      {
         StatisticRegistry.getInstance().runThread();
      }
   }
}
